package aip2011.controller.localita.dettaglio.caricaFoto;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.controller.upload.FileItem;

import aip2011.service.LocalitaService;

public class UploadController extends Controller {

    LocalitaService service=new LocalitaService();
    
    @Override
    public Navigation run() throws Exception {
        FileItem immagine = requestScope("immagine");
        service.upload(immagine, asKey("key"));
        return redirect("/localita/dettaglio?key="+asString("key"));
       
    }
}
